<!--
 * @Description: 
 * @Autor: 商晓彬
 * @Date: 2021-09-02 11:20:05
 * @LastEditors: 商晓彬
 * @LastEditTime: 2021-12-13 15:51:15
-->

<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="add modal fade" tabindex="-1" role="dialog"
    aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{backdrop: 'static', keyboard: !saving}">
    <div style="width:500px!important;margin: 1.75rem auto;">
        <div class="modal-content">
            <form *ngIf="active" #bopForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span>标签打印</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')"
                        [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body" style="height: 733px!important;overflow: auto; width: 100%;" id="msg">
                    <div id="msg">
                        <div *ngFor="let item of printInfo" style="height: 360px;padding: 5px;">
                            <div style="height:27%;width: 100%;margin-bottom: 10px;">
                                <div style="width: 100%;display: flex;">
                                    <div style="width: 30%;height: 100%;">
                                        <qr-code [value]="item.id" [size]="100"></qr-code>
                                    </div>
                                    <div style="width: 70%;height: 100%;">
                                        <div style="width: 100%;height: 30%;">{{item.joinText}} </div>
                                    </div>
                                </div>
                            </div>
                            <div *ngFor="let msg of item.printLoadEntityDtos;let i = index">
                                {{i+1}}、{{msg.code}} 名称:{{msg.name}} 数量：{{msg.number}}
                            </div>
                        </div>
                        <!-- <div style="height: 150px;">
                            <div style="width: 100%;display: flex;">
                                <div style="width: 20%;">
                                    <qr-code [value]="printInfo[0].id" [size]="90"></qr-code>
                                </div>
                                <div style="width: 55%;transform:scaleX(0.7);float: left;">
                                    <div *ngFor="let item of getPno('GC2CGA31-0S112004Z211')">{{item}}</div>
                                    <div>工序1工步2</div>
                                </div>
                            </div>
                            <div style="transform:scaleX(0.7);float: left;">
                                <div *ngFor="let item of getMateral('CW-4037CCW-4037CCW-4037CCW-4037C|温度传感器|4')">{{item}}</div>
                                <div *ngFor="let item of getMateral('CW-4037CCW-4037CCW-4037CCW-4037C|温度传感器温度传感器|4')">{{item}}</div>
                            </div>
                        </div> -->
                    </div>
                </div>
                <div class="modal-footer" style="justify-content: center;">
                    <button pButton type="button" label="打印" (click)="save()" style="margin-left: 0.5rem"></button>
                </div>
            </form>
        </div>
    </div>
</div>